﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<ali:Get ID="Client" Object="Client" InnerID="Request.QueryString['ID']" Validate="True" />
<section data-page="client_edit" data-title="编辑客户端" data-lang="<%=ContentLang%>" data-id="<%=Request.QueryString['ID']%>">
	<dl class="path1">
		<dt><span>您的位置：</span><a href="list.aspx?Lang=<%=ContentLang%>" target="ali-navtab">客户端列表</a> → <b class="<%=ContentLang%>Font"><%=Client[Name]%></b></dt>
		<dd>
			<select data-class="<%=ContentLang%>Font" data-ali-widget="combo">
				<ali:List Object="Language" Source="Manager.Languages">
					<ali:Record>
						<%If Convert.ToString(Ab) == ContentLang%>
							<option value="<%=Ab%>" selected><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%Else%>
							<option value="<%=Ab%>"><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%EndIf%>
					</ali:Record>
				</ali:List>
			</select>
		</dd>
	</dl>
	<form action="" class="post">
		<div class="post-body">
			<table class="post-table margin2">
				<tr>
					<th width="120">名称：</th>
					<td><input type="text" name="Name" value="<%=Client[Name]%>" size="30" class="ali-input <%=ContentLang%>Font"></td>
				</tr>
				<tr>
					<th>角色：</th>
					<td>
						<ali:List Object="Role">
							<select name="RoleID" data-class="<%=ContentLang%>Font" data-ali-widget="combo">
								<ali:Record>
									<%If Guid.Equals(Client[RoleID], ID)%>
										<option value="<%=ID%>" selected><%=Name%></option>
									<%Else%>
										<option value="<%=ID%>"><%=Name%></option>
									<%EndIf%>
								</ali:Record>
							</select>
						</ali:List>
					</td>
				</tr>
				<tr>
					<th>配置：</th>
					<td>
						<textarea name="Settings" rows="6" cols="60" class="ali-input CHSFont"><%=HttpUtility.HtmlEncode(Client[Settings].ToString())%></textarea>
						<br>
						注：格式为json。目前可支持的配置为：{"instances":[{"mark":"System","id":1}]}
					</td>
				</tr>
				<tr>
					<th>编号（CID）</th>
					<td><%=Convert.ToString(Client[ID]).Replace("-", "")%></td>
				</tr>
				<tr>
					<th>秘钥（Secret）：</th>
					<td><%=Client[Secret]%></td>
				</tr>
			</table>
		</div>
		<div class="post-footer"><button type="submit" class="ali-button">保 存</button></div>
	</form>
</section>